/**
    Copyright (c) 2010 yakiimo02
    Distributed under the New BSD License.
    See included license.txt or http://www.yakiimo3d.com/NewBSDLicense.txt
**/

#include "DXUT.h"
#include "DataBuffer.h"

/**
*/
DataBuffer::DataBuffer() : m_nWidth( 0 ), m_nHeight( 0 )
{
}

/**
*/
DataBuffer::~DataBuffer()
{
}

/**
*/
void DataBuffer::Create( int nWidth, int nHeight )
{
    m_nWidth = nWidth;
    m_nHeight = nHeight;
    const int nSize = m_nWidth*m_nHeight;
    m_data.resize( nSize );
    for( int nIndex=0; nIndex<nSize; ++nIndex ) 
    {
        m_data[ nIndex ] = BufType( 0.0f, 0.0f, 0.0f, 0.0f );
    }
}

/**
*/
void DataBuffer::Destroy()
{
    m_data.clear();
}